import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'login',
      component: () => import('../components/Login/MyLogin.vue'),
    },
    {
      path: '/register',
      name: 'register',
      component: () => import('../components/Register/MyRegister.vue')
    },
    {
      path: '/home',
      name: 'home',
      component: () => import('../components/Home/MyHome.vue'),
      children: [
        {
          path: 'page1',
          name: 'Page1',
          component: () => import('../components/Page1.vue')
        },
        {
          path: 'page2',
          name: 'Page2',
          component: () => import('../components/Page2.vue')
        },
        {
          path: 'page3',
          name: 'Page3',
          component: () => import('../components/Page3.vue')
        },
        {
          path: 'page4',
          name: 'Page4',
          component: () => import('../components/Page4.vue')
        },
        {
          path: 'page5',
          name: 'Page5',
          component: () => import('../components/Page5.vue')
        },
        {
          path: 'page6',
          name: 'Page6',
          component: () => import('../components/Page6.vue')
        }
      ]
    }
  ],
})

export default router
